import { _decorator, Component, sp } from 'cc';
import Common from '../Config/Common';
const { ccclass, property } = _decorator;
/** 爆炸弹爆炸 */
@ccclass('ExplodeBullet')
export class ExplodeBullet extends Component {

    @property(sp.Skeleton) // 绑定 Spine 组件
    explodeSpine: sp.Skeleton = null;

    onLoad(): void {
        if (this.explodeSpine) {
            let aniName = 'BaoZha';
            Common.instance.playSpine(this.explodeSpine, aniName, false, null, () => {
                this.node.removeFromParent();
            });
        }
    }
}
